.text
.section	.rodata
.LC0:
	.string	"%d"
.LC1:
	.string	"a[%d] = %d\n"

.text
.globl	main
.type	main, @function
main:
.LFB0:
	pushq	%rbp
	movq	%rsp, %rbp
	subq	$64, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movl	$0, -52(%rbp)
	jmp	.L2
.L6:
	leaq	-48(%rbp), %rdx
	movl	-52(%rbp), %eax
	cltq
	salq	$2, %rax
	addq	%rdx, %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf
	cmpl	$1, %eax
	jne	.L4
	addl	$1, -52(%rbp)
	jmp	.L2
.L5:
	nop
.L4:
	call	getchar
	cmpl	$10, %eax
	jne	.L5
.L2:
	cmpl	$9, -52(%rbp)
	jle	.L6
	movl	$0, -52(%rbp)
	jmp	.L7
.L8:
	movl	-52(%rbp), %eax
	cltq
	movl	-48(%rbp,%rax,4), %edx
	movl	-52(%rbp), %eax
	movl	%eax, %esi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf
	addl	$1, -52(%rbp)
.L7:
	cmpl	$9, -52(%rbp)
	jle	.L8
	movl	$0, %eax
	leave
	ret
